var serviceModule=new Object({
    //加载轮播图
    loadCarousel : function (){
                    $.ajax({
                        url : '/front/queryCarouselByNomal',
                        type : 'post',
                        dataType : 'json'
                    }).done(function(data){
                        if(data){
                            $('#fh5co-hero ul.slides').empty();
                            for(var i=0;i<data.length;i++){
                                var liHtml='<li style="background-image: url('+data[i].picture+');">'+
                                    '<div class="overlay-gradient"></div>'+
                                    '<div class="container">'+
                                    '<div class="row">'+
                                    '<div class="col-md-8 col-md-offset-2 text-center slider-text">'+
                                    '<div class="slider-text-inner">'+
                                    '<h1>'+data[i].title+'</h1>'+
                                    '<p><a class="btn btn-primary btn-lg" href="#">Start Learning Now!</a></p>'+
                                    '</div>'+
                                    '</div>'+
                                    '</div>'+
                                    '</div>'+
                                    '</li>';
                                $('#fh5co-hero ul.slides').append(liHtml);
                            }
                            $('#fh5co-hero .flexslider').flexslider({
                                animation: "slide",

                                easing: "swing",
                                direction: "vertical",

                                slideshowSpeed: 5000,
                                directionNav: true,
                                start: function(){
                                    setTimeout(function(){
                                        $('.slider-text').removeClass('animated fadeInUp');
                                        $('.flex-active-slide').find('.slider-text').addClass('animated fadeInUp');
                                    }, 500);
                                },
                                before: function(){
                                    setTimeout(function(){
                                        $('.slider-text').removeClass('animated fadeInUp');
                                        $('.flex-active-slide').find('.slider-text').addClass('animated fadeInUp');
                                    }, 500);
                                }

                            });
                        }
                    })
                },
    //加载服务信息
    loadService : function (){
                    $.ajax({
                        url : '/back/queryAllServiceByPage',
                        type : 'post',
                        dataType : 'json'
                    }).done(function(data){
                        if(data){
                            $('#fh5co-course .service').empty();
                            for(var i=0;i<data.length;i++){
                                var ser_html='<div class="col-md-6 animate-box fadeInUp animated-fast">'+
                                    '<div class="course">'+
                                    '<a href="#" class="course-img" style="background-image: url('+data[i].picture+');">'+
                                    '</a>'+
                                    '<div class="desc">'+
                                    '<h3><a href="#">'+data[i].title+'</a></h3>'+
                                    '<p>'+data[i].description+'</p>'+
                                    '</div>'+
                                    '</div>'+
                                    '</div>';
                                $('#fh5co-course .service').append(ser_html);
                            }
                        }
                    })

            }
});